package com.hession.service.impl;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.hessian.token.TokenUtil;
import com.hessian.token.util.ProUtil;
import com.hession.back.AccountResult;
import com.hession.service.DFRightService;
import java.io.IOException;
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.Properties;
import javax.servlet.ServletException;

public class DFRightServiceImplbak
  
{
  private String signature;
  private String nonce;
  private String timestamp;
  
  public void setSinagure(String sinature)
  {
    this.signature = sinature;
  }
  
  public void setNonce(String nonce)
  {
    this.nonce = nonce;
  }
  
  public void setTimestamp(String timestamp)
  {
    this.timestamp = timestamp;
  }
  
//  public boolean doGroupArrGet(String[] accountCodesArr, String Message)
//    throws ServletException, IOException
//  {
//    if (!TokenUtil.validateSignature(this.signature, this.timestamp, this.nonce)) {
//      return false;
//    }
//    List<AccountResult> userList = new ArrayList();
//    for (int i = 0; i < accountCodesArr.length; i++)
//    {
//      AccountResult account = new AccountResult();
//      account.setCode(accountCodesArr[i]);
//      userList.add(account);
//    }
//    Gson gon = new GsonBuilder().create();
//    
////    Runtime.getRuntime().exec(
////      ProUtil.propertie.get("url") + "&accountCodeArr=" + 
////      URLEncoder.encode(gon.toJson(userList), "utf-8") + 
////      "&chat=" + URLEncoder.encode(Message, "UTF-8"));
////    
//    
//    Runtime.getRuntime().exec(ProUtil.propertie.get("url") + "&accountCodeArr=system&chat=" + URLEncoder.encode(Message, "UTF-8"));
//    	    
//    return true;
//  }
}
